import Data.Char
import Tipos
import Tokens
import Sintatico
import Interpretador


main = 
    do
        file <- readFile "programa1.90i"
        let z = lexico file
        let (a,b) = infix_to_prefix z [] []
        let (c, d, e) = expression b
        putStrLn (show e)
        let (f, g) = avalExpr e [("x", Int_v 0)]
--        let (c,d) = infix_to_prefix b [] []
  --      show (d)
        --let (k,p) = avalExpr c table
        
        -- tabela de símbolos
        --putStrLn (show k)
        -- value
        --putStrLn (show p)
        -- resultado sintático
        putStrLn (show z)
        -- tokens
        putStrLn (show b)
        -- expressões
        putStrLn (show g)
        

        
        -- tokens
      --  putStrLn (show z)
